// src/stores/sys/SysMenuStore222.ts
import { defineStore } from 'pinia'

// 定义菜单项的类型
export interface MenuItem {
  index: string;
  title: string;
  // 修改 icon 类型为字符串，用于存储图标名称
  icon?: string;
  path?: string;
  children?: MenuItem[];
  disabled?: boolean;
}

// 定义菜单列表的类型
export interface sysMenuList {
  sysMenuList: MenuItem[]
}

export const useSysMenuStore222 = defineStore('sysMenu222', {
  state: (): sysMenuList => ({
    sysMenuList: [
      {
        index: '1',
        title: '工作台',
        icon: "House",
        path: '/dashboard',
        children: [
          { index: '1-1', title: '首页概览', icon: "Document", path: '/dashboard/home'  },
          { index: '1-2', title: '待办理任务', icon: "Document", path: '/dashboard/pending' },
          { index: '1-3', title: '已完成任务', icon: "Document", path: '/dashboard/completed' },
          { index: '1-4', title: '我的任务', icon: "Document", path: '/dashboard/my-tasks'  },
          { index: '1-5', title: '我的计划', icon: "Document", path: '/dashboard/my-plans'  },
        ],
      },
      {
        index: '2',
        title: '基础资料管理',
        icon: "Document",
        path: '/basic',
        children: [
          { index: '2-1', title: '车间资料', icon: "Document", path: '/basic/workshop'  },
          { index: '2-2', title: '仓库资料', icon: "Document", path: '/basic/warehouse'  },
          { index: '2-3', title: '品牌资料', icon: "Document", path: '/basic/brand'  },
          { index: '2-4', title: '单位资料', icon: "Document", path: '/basic/unit'  },
          { index: '2-5', title: '供应商管理', icon: "Document", path: '/basic/supplier'  },
          { index: '2-6', title: '客户管理', icon: "Document", path: '/basic/customer'  },
        ],
      },
      {
        index: '3',
        title: '货品管理',
        icon: "Tickets",
        path: '/product',
        children: [
          { index: '3-1', title: '货品类别', icon: "Document", path: '/product/category'  },
          { index: '3-2', title: '货品资料', icon: "Document", path: '/product/info'  },
          { index: '3-3', title: '货品库存', icon: "Document", path: '/product/stock'  },
          { index: '3-4', title: '库存查询', icon: "Document", path: '/product/stock-query'  },
          { index: '3-5', title: '库存调整', icon: "Document", path: '/product/stock-adjust'  },
          { index: '3-6', title: '调整记录', icon: "Document", path: '/product/adjust-records'  },
        ],
      },
      {
        index: '4',
        title: '订单管理',
        icon: "Clock",
        path: '/order',
        children: [
          { index: '4-1', title: '订单录入', icon: "Document", path: '/order/create'  },
          { index: '4-2', title: '订单查询', icon: "Document", path: '/order/query'  },
          { index: '4-3', title: '订单打印', icon: "Document", path: '/order/print'  },
          { index: '4-4', title: '订单取消', icon: "Document", path: '/order/cancel'  },
          { index: '4-5', title: '订单统计', icon: "Document", path: '/order/stats'  },
        ],
      },
      {
        index: '5',
        title: '计划管理',
        icon: "Tickets",
        path: '/plan',
        children: [
          { index: '5-1', title: '计划排单', icon: "Document", path: '/plan/schedule'  },
          { index: '5-2', title: '工单录入', icon: "Document", path: '/plan/work-order/create'  },
          { index: '5-3', title: '工单查询', icon: "Document", path: '/plan/work-order/query'  },
          { index: '5-4', title: '工单打印', icon: "Document", path: '/plan/work-order/print'  },
          { index: '5-5', title: '工单取消', icon: "Document", path: '/plan/work-order/cancel'  },
          { index: '5-6', title: '工单修改', icon: "Document", path: '/plan/work-order/update'  },
        ],
      },
      {
        index: '6',
        title: '生产管理',
        icon: "Clock",
        path: '/production',
        children: [
          { index: '6-1', title: '报工扫描', icon: "Document", path: '/production/report'  },
          { index: '6-2', title: '不良品管理', icon: "Document", path: '/production/defective'  },
          { index: '6-3', title: '返修品管理', icon: "Document", path: '/production/rework'  },
          { index: '6-4', title: '换码管理', icon: "Document", path: '/production/code-change'  },
          { index: '6-5', title: '包装管理', icon: "Document", path: '/production/package'  },
          { index: '6-6', title: '生产库存查询', icon: "Document", path: '/production/stock-query'  },
          { index: '6-7', title: '报工报表', icon: "Document", path: '/production/report-stats'  },
          { index: '6-8', title: '生产报表', icon: "Document", path: '/production/stats'  },
        ],
      },
      {
        index: '7',
        title: '物料管理',
        icon: "Clock",
        path: '/material',
        children: [
          { index: '7-1', title: '入库管理', icon: "Document", path: '/material/inbound'  },
          { index: '7-2', title: '物料移交', icon: "Document", path: '/material/transfer'  },
          { index: '7-3', title: '出库管理', icon: "Document", path: '/material/outbound'  },
          { index: '7-4', title: '盘点管理', icon: "Document", path: '/material/check'  },
          { index: '7-5', title: '调整管理', icon: "Document", path: '/material/adjust'  },
          { index: '7-6', title: '物料库存查询', icon: "Document", path: '/material/stock-query'  },
          { index: '7-7', title: '库存报表', icon: "Document", path: '/material/stock-stats'  },
          { index: '7-8', title: '物料报表', icon: "Document", path: '/material/stats'  },
        ],
      },
      {
        index: '8',
        title: '用户与权限',
        icon: "Setting",
        path: '/user',
        children: [
          { index: '8-1', title: '用户管理', icon: "Document", path: '/user/manage'  },
          { index: '8-2', title: '角色管理', icon: "Document", path: '/user/role'  },
          { index: '8-3', title: '用户角色分配', icon: "Document", path: '/user/assign-role'  },
          { index: '8-4', title: '模块管理', icon: "Document", path: '/user/module'  },
          { index: '8-5', title: '权限管理', icon: "Document", path: '/user/permission'  },
          { index: '8-6', title: '角色授权', icon: "Document", path: '/user/authorize'  },
          { index: '8-7', title: '用户注册', icon: "Document", path: '/user/register'  },
          { index: '8-8', title: '登录认证', icon: "Document", path: '/user/login'  },
          { index: '8-9', title: '修改密码', icon: "Lock", path: '/user/change-password' },
        ],
      },
      {
        index: '9',
        title: '系统设置',
        icon: "Setting",
        path: '/system',
        children: [
          { index: '9-1', title: '系统参数', icon: "Avatar", path: '/system/params'  },
          { index: '9-2', title: '菜单管理', icon: "Document", path: '/system/menu'  },
          { index: '9-3', title: '操作日志', icon: "Document", path: '/system/logs'  },
          { index: '9-4', title: '数据字典', icon: "Document", path: '/system/dict'  },
          { index: '9-5', title: '字典项目', icon: "Document", path: '/system/dict-item'  },
          { index: '9-6', title: '字典值管理', icon: "Document", path: '/system/dict-value'  },
        ],
      },
    ],
  }),
})